package com.upcoming.data.storm.kafka;

import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.topology.TopologyBuilder;

/**
 * 作者：tianjiayuan
 * 创建时间：2018-05-23 14:23
 * 类描述：
 * 修改人：
 * 修改时间：
 */
public class KafkaTopology {

    public static void main(String[] args) throws Exception{
        TopologyBuilder builder = new TopologyBuilder();
        Config conf = new Config();
        conf.setDebug(true);

        builder.setSpout("kafakSpout", new KafkaSpout());

        builder.setBolt("kafakBolt", new EventBolt()).shuffleGrouping("kafakSpout");

        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("kafkaToplogy", conf, builder.createTopology());
        while (true){

        }
    }
}
